import 'package:flutter/material.dart';

class CustomTabBar extends StatelessWidget {
  final List<String> tabList;
  final TabController controller;

  const CustomTabBar({
    super.key,
    required this.tabList,
    required this.controller,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.maxFinite,
      padding: EdgeInsets.only(top: 30),
      height: 60,
      child: TabBar(
        controller: controller,
        isScrollable: true,
        tabAlignment: TabAlignment.start,
        dividerColor: Colors.transparent,
        indicatorColor: Color(0xff6AC0F5),
        labelStyle: TextStyle(fontSize: 22, color: Colors.white),
        unselectedLabelStyle: TextStyle(fontSize: 20, color: Colors.white70),
        tabs: tabList.map((item) {
          return Tab(text: item);
        }).toList(),
      ),
    );
  }
}
